package com.liruo.learn.spring.mvc.validate;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
import javax.validation.constraintvalidation.SupportedValidationTarget;
import javax.validation.constraintvalidation.ValidationTarget;
import java.util.Arrays;

/**
 * @Author:liruo
 * @Date:2023-06-10-20:58:38
 * @Desc
 */
@SupportedValidationTarget(ValidationTarget.PARAMETERS)
public class TestCrossValidator implements ConstraintValidator<TestCross, Object[]> {
    @Override
    public boolean isValid(Object[] value, ConstraintValidatorContext context) {
        System.out.println("args=" + Arrays.toString(value));
        return true;
    }
}
